/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoopp.qcoinpay;

import android.app.Activity;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
import android.widget.TextView;

public final class aa extends BaseAdapter {
    private Activity a;
    private String[] b;
    private int c;
    private bi d;

    public aa(Activity paramActivity, String[] paramArrayOfString) {
        this.a = paramActivity;
        this.b = paramArrayOfString;
        this.d = bi.a(this.a);
    }

    public final int getCount() {
        if (this.b == null)
            return 0;
        return this.b.length;
    }

    public final Object getItem(int paramInt) {
        return this.b[paramInt];
    }

    public final long getItemId(int paramInt) {
        return paramInt;
    }

    public final void a(int paramInt) {
        this.c = paramInt;
        notifyDataSetChanged();
    }

    public final View getView(int paramInt, View paramView, ViewGroup paramViewGroup) {
        if (paramView == null) {
            paramView = new RelativeLayout(this.a);
            paramViewGroup = cz.a(this.a, 10.0F);
            paramView.setPadding(paramViewGroup, paramViewGroup, paramViewGroup, paramViewGroup);
            paramViewGroup = cz.a(this.a, 18.5F);
            TextView localTextView;
            (localTextView = new TextView(this.a)).setTextColor(-13421773);
            localTextView.setSingleLine();
            localTextView.setTextSize(14.0F);
            Object localObject;
            (localObject = new RelativeLayout.LayoutParams(-1, -2)).rightMargin = paramViewGroup;
            ((RelativeLayout.LayoutParams) localObject).addRule(15, -1);
            paramView.addView(localTextView, (ViewGroup.LayoutParams) localObject);
            (localObject = new ImageView(this.a)).setScaleType(ImageView.ScaleType.FIT_XY);
            (paramViewGroup = new RelativeLayout.LayoutParams(paramViewGroup, paramViewGroup)).addRule(11, -1);
            paramViewGroup.addRule(15, -1);
            paramView.addView((View) localObject, paramViewGroup);
            (paramViewGroup = new c(this, 0)).b = localTextView;
            paramViewGroup.a = ((ImageView) localObject);
            paramView.setTag(paramViewGroup);
        }
        else {
            paramViewGroup = (c) paramView.getTag();
        }
        if (paramInt == this.c)
            this.d.a(paramViewGroup.a, "img_amount_press.png");
        else
            this.d.a(paramViewGroup.a, "img_amount_nor.png");
        paramViewGroup.b.setText(this.b[paramInt]);
        return ((View) paramView);
    }
}